﻿
<%@ Page Language="C#" Theme="Default" MasterPageFile="~/MasterPages/admin.master" AutoEventWireup="true"  CodeFile="KhachHang.aspx.cs" Inherits="KhachHang" Title="KhachHang List" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">Khach Hang List</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
		<data:GridViewSearchPanel ID="GridViewSearchPanel1" runat="server" GridViewControlID="GridView1" PersistenceMethod="Session" />
		<br />
		<data:EntityGridView ID="GridView1" runat="server"			
				AutoGenerateColumns="False"					
				OnSelectedIndexChanged="GridView1_SelectedIndexChanged"
				DataSourceID="KhachHangDataSource"
				DataKeyNames="KhachHangId"
				AllowMultiColumnSorting="false"
				DefaultSortColumnName="" 
				DefaultSortDirection="Ascending"	
				ExcelExportFileName="Export_KhachHang.xls"  		
			>
			<Columns>
				<asp:CommandField ShowSelectButton="True" ShowEditButton="True" />				
				<asp:BoundField DataField="KhachHangId" HeaderText="Khach Hang Id" SortExpression="KhachHangID" ReadOnly />
				<asp:BoundField DataField="TenKh" HeaderText="Ten Kh" SortExpression="Ten_KH"  />
				<asp:BoundField DataField="GioiTinh" HeaderText="Gioi Tinh" SortExpression="Gioi_Tinh"  />
				<asp:BoundField DataField="NgaySinh" DataFormatString="{0:d}" HtmlEncode="False" HeaderText="Ngay Sinh" SortExpression="Ngay_Sinh"  />
				<asp:BoundField DataField="MaKh" HeaderText="Ma Kh" SortExpression="Ma_KH"  />
				<asp:BoundField DataField="Cmnd" HeaderText="Cmnd" SortExpression="CMND"  />
				<asp:BoundField DataField="NgayCap" DataFormatString="{0:d}" HtmlEncode="False" HeaderText="Ngay Cap" SortExpression="Ngay_Cap"  />
				<asp:BoundField DataField="NoiCap" HeaderText="Noi Cap" SortExpression="Noi_Cap"  />
				<asp:BoundField DataField="SoDtDk" HeaderText="So Dt Dk" SortExpression="So_DT_DK"  />
				<asp:BoundField DataField="SoDtCty" HeaderText="So Dt Cty" SortExpression="So_DT_CTY"  />
				<asp:BoundField DataField="Fax" HeaderText="Fax" SortExpression="Fax"  />
				<asp:BoundField DataField="SoGpdkkd" HeaderText="So Gpdkkd" SortExpression="So_GPDKKD"  />
				<asp:BoundField DataField="DiaChiTt" HeaderText="Dia Chi Tt" SortExpression="Dia_Chi_TT"  />
				<asp:BoundField DataField="HoKhauTt" HeaderText="Ho Khau Tt" SortExpression="Ho_Khau_TT"  />
				<asp:BoundField DataField="ParentId" HeaderText="Parent Id" SortExpression="Parent_ID"  />
				<asp:BoundField DataField="DiaChiCty" HeaderText="Dia Chi Cty" SortExpression="Dia_Chi_Cty"  />
				<asp:BoundField DataField="BranchId" HeaderText="Branch Id" SortExpression="BranchID"  />
				<asp:BoundField DataField="LoaiKh" HeaderText="Loai Kh" SortExpression="Loai_KH"  />
				<asp:BoundField DataField="MaSoHv" HeaderText="Ma So Hv" SortExpression="MaSoHV"  />
				<asp:BoundField DataField="NgayDangKy" DataFormatString="{0:d}" HtmlEncode="False" HeaderText="Ngay Dang Ky" SortExpression="NgayDangKy"  />
			</Columns>
			<EmptyDataTemplate>
				<b>No KhachHang Found!</b>
			</EmptyDataTemplate>
		</data:EntityGridView>
		<br />
		<asp:Button runat="server" ID="btnKhachHang" OnClientClick="javascript:location.href='KhachHangEdit.aspx'; return false;" Text="Add New"></asp:Button>
		<data:KhachHangDataSource ID="KhachHangDataSource" runat="server"
			SelectMethod="GetPaged"
			EnablePaging="True"
			EnableSorting="True"
>			<Parameters>
				<data:CustomParameter Name="WhereClause" Value="" ConvertEmptyStringToNull="false" />
				<data:CustomParameter Name="OrderByClause" Value="" ConvertEmptyStringToNull="false" />
				<asp:ControlParameter Name="PageIndex" ControlID="GridView1" PropertyName="PageIndex" Type="Int32" />
				<asp:ControlParameter Name="PageSize" ControlID="GridView1" PropertyName="PageSize" Type="Int32" />
				<data:CustomParameter Name="RecordCount" Value="0" Type="Int32" />
			</Parameters>
		</data:KhachHangDataSource>
	    		
</asp:Content>



